package tianwang.util;

public class FltrpDebugUtil {
	private static boolean isDebug = true;
	private static boolean isError = false;
	
	private static StringBuilder cache = null;
	
	public static void appendCache(String str){
		if(cache == null){
			cache = new StringBuilder();
		}
		cache.append(str + "\n");
	}
	
	public static String getCache(){
		String str = null;
		if(cache != null){
			str = cache.toString();
			cache = null;
		}
		return str;
	}
	
	public static void debug(String str){
		if(isDebug){
			System.out.println(str);
		}
	}
	public static void error(String str){
		if(isError){
			System.err.println(str);
		}
	}
}
